package com.gitee.wsl.compose.chart.xy.model

import androidx.compose.animation.core.AnimationSpec
import androidx.compose.runtime.Composable
import com.gitee.wsl.compose.chart.ChartDataModel
import com.gitee.wsl.compose.chart.ChartEntry
import com.gitee.wsl.compose.chart.KoalaPlotTheme
import com.gitee.wsl.compose.chart.xy.axis.AxisModel

interface XYChartDataModel<X,Y,E:ChartEntry> : ChartDataModel{

    fun getLineCount():Int

    fun getLineAt(index:Int):List<E>

    fun getAxisModelX(): AxisModel<X>

    fun getAxisModelY(): AxisModel<Y>

    fun getXLabel(item:X):String

    fun getYLabel(item:Y):String

    @Composable
    fun getLineAnimationSpec(index:Int): AnimationSpec<Float> =  KoalaPlotTheme.animationSpec

}